home *** CD-ROM | disk | FTP | other *** search
- Path: beta.nedernet.nl!usenet
- From: jos@and.nl (Jos A. Horsmeier)
- Newsgroups: comp.lang.c
- Subject: Re: formatting integers
- Date: 29 Mar 1996 16:15:46 GMT
- Organization: AND Operations Research B.V.
- Distribution: usa
- Message-ID: <4jh2bi$2ll@beta.nedernet.nl>
- References: <4jfmsh$lal@uwm.edu>
- NNTP-Posting-Host: klepzeiker.and.nl
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=ISO-8859-1
- X-Newsreader: WinVN 0.99.5
-
- In article <4jfmsh$lal@uwm.edu>, gidwani@alpha1.csd.uwm.edu wrote:
-
- |I am trying to format an integer that is left justified, length of 4 and
- |0 filled.
- |
- |I tried the following %-0*%d and typed in the length of 4, but it gave me
- |the following output
- |
- | 4.
- | When I try %0*d, then I get the following output.
- | 0004.
- | The length and the 0 filled in works but I cannot get it to left
- | justify.
-
- Correct me if I'm wrong, but doesn't 'left justifying' mean that the
- most significant digit of the number appears at the leftmost position,
- i.e. no other characters precede that most sifnificant digit?
-
- kind regards,
-
- Jos aka jos@and.nl
- --
- Atnwgqkrl gy zit vgksr, ug qshiqwtzoeqs!
-
-